package nciae.db.service;

import nciae.db.common.CommonResult;

import nciae.db.pojo.entity.User;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;


public interface UserService {
    public CommonResult<User> checkUser(String userName, String pwd,HttpSession session);
    public User getUserInfo(Integer userId);
    public CommonResult search(String name,String realName,String role,String tel,Integer page,Integer size);
    public CommonResult save(User user);
    public CommonResult delete(Integer id);
    public CommonResult resetPwd(Integer id);
    public CommonResult changePwd(Integer id,String oldPwd,String newPwd);
    public CommonResult<Integer> findUserId(String chargerName);
    public CommonResult<Integer> batchImport(MultipartFile file);

    public CommonResult<List<String>> listChargerName();

    public User getLoginUser(HttpSession session);
    public CommonResult<List<User>> getUsersByRole(String role);

    Map<String, Integer> getUserCategoryStatistics();

    public boolean getUserIsAdmin(Integer id);
}
